﻿using System;
using System.Runtime.Serialization;

namespace Simp.CodeModel.Exceptions
{
	/// <summary>Base class for the Simp Runtime exceptions.</summary>
	[Serializable()]
	public class SimpRuntimeException : ApplicationException
	{
		/// <summary>Default constructor.</summary>
		public SimpRuntimeException() { }

		/// <summary>Constructor taking a message.</summary>
		/// <param name="message"/>
		public SimpRuntimeException(string message) : base(message) { }
		
		/// <summary>Constructor taking a message and an inner exception.</summary>
		/// <param name="message"></param>
		/// <param name="inner"></param>
		public SimpRuntimeException(string message, Exception inner) : base(message, inner) { }

		/// <summary>Constructor needed for serialization when exception propagates from a remoting server to the client.</summary>
		/// <param name="info"></param>
		/// <param name="context"></param>
		protected SimpRuntimeException(SerializationInfo info, StreamingContext context) : base(info, context) { }
	}
}